﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Shell.Structure
{
    public class Condition
    {
        private bool _isTrueCanPass = true;
        public ConditionDef ConditionDef { get; set; }

        public Condition(bool trueCanPass, ConditionDef conditionDef)
        {
            ConditionDef = conditionDef;
            _isTrueCanPass = trueCanPass;
        }

        public bool IsPassed()
        {
            if (_isTrueCanPass)
            {
                return ConditionDef.IsPassed;
            }
            else
            {
                return !ConditionDef.IsPassed;
            }
        }
    }
}
